package com.caltco.cargo.ops.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.caltco.cargo.ops.common.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.sql.Date;
import java.time.LocalDateTime;

@Data
@TableName("daily_task")
@Schema(description = "统计")
public class DailyTask extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "Id")
    private Long id;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "统计日期")
    private Date date;

    @Schema(description = "学习单词数量")
    @TableField("learn_word_num")
    @JsonProperty("learnWordNum")
    private Integer learnWordNum;

    @Schema(description = "复习单词数量")
    @TableField("reviews_word_num")
    @JsonProperty("reviewsWordNum")
    private Integer reviewsWordNum;


    @Schema(description = "每日学习单词计划")
    @TableField("word_daily_statistics")
    @JsonProperty("wordDailyStatistics")
    private Integer wordDailyStatistics;


    @Schema(description = "每日复习单词数量")
    @TableField("reviews_daily_statistics")
    @JsonProperty("reviewsDailyStatistics")
    private Integer reviewsDailyStatistics;


    @Schema(description = "是否删除")
    @TableField("is_delete")
    @JsonProperty("isDelete")
    @TableLogic(value = "0", delval = "1")
    private Integer isDelete;
}
